
function Music() {
    this.bgMusic=false;
    this.bgEffect=false;
    this.playMusic = function (str, bool) {
        if (this.bgMusic) {
            cc.audioEngine.playMusic(str, bool);
        }
    };
    this.stopMusic = function () {
        cc.audioEngine.pauseMusic();
    };
    this.playEffect = function (str) {
        if (this.bgEffect) {
            cc.audioEngine.playEffect(str, false, 1);
        }
    };
    this.stopAllEffects = function (str) {
        cc.audioEngine.stopAllEffects();
    };
    this.pauseMusic = function (str) {
        cc.audioEngine.pauseMusic();
    };
    this.resumeMusic = function (str) {
        cc.audioEngine.resumeMusic();
    };
    /*暂停播放所有音效*/
    this.pauseAllEffects = function () {

    }
    /*回复播放所有音效*/
    this.resumeAll = function () {

    }
    /*停止播放所有音效*/
    this.stopAllEffects = function () {

    }
}

var _instance = null;
module.exports = function () {
    if (!_instance) {
        _instance = new Music();
    }
    return _instance;
};